# Navitrak DNA marker format
gpsbabel -i dna -f ${REFERENCE}/dnatest.txt -o dna -F ${TMPDIR}/dnatest.txt
-compare ${TMPDIR}/dnatest.txt ${REFERENCE}/dnatest.txt
+compare ${REFERENCE}/dnatest.txt ${TMPDIR}/dnatest.txt
# PSP (PocketStreets 2002 Pushpin (.PSP)) file format. Use mxf as an
# intermediate format to avoid binary FP anomalies on compareerent platforms.
gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o gpsdrive -F ${TMPDIR}/gpsdrive.txt
compare ${TMPDIR}/gpsdrive.txt ${REFERENCE}
gpsbabel -i gpsdrive -f ${REFERENCE}/gpsdrive.txt -o gpsdrive -F ${TMPDIR}/gpsdrive2.txt
-compare ${TMPDIR}/gpsdrive2.txt ${REFERENCE}/gpsdrive.txt
+compare ${REFERENCE}/gpsdrive.txt ${TMPDIR}/gpsdrive2.txt
# XMapHH Street Atlas USA file format
rm -f ${TMPDIR}/xmapwpt.wpt ${TMPDIR}/xmapwpt.xmapwpt
rm -f ${TMPDIR}/mps-track.mps
gpsbabel -i mapsource -f ${REFERENCE}/track/mps-track.mps -o mapsource,mpsverout=3 \
-F ${TMPDIR}/mps-track.mps
-compare ${TMPDIR}/mps-track.mps ${REFERENCE}/mps-empty.mps
+compare ${REFERENCE}/mps-empty.mps ${TMPDIR}/mps-track.mps
#
# MRCB mapsource route test
rm -f ${TMPDIR}/mps-route.mps
gpsbabel -r -i mapsource -f ${REFERENCE}/route/route.mps -o mapsource,mpsverout=4 \
-F ${TMPDIR}/mps-route.mps
-compare ${TMPDIR}/mps-route.mps ${REFERENCE}/route/route.mps
+compare ${REFERENCE}/route/route.mps ${TMPDIR}/mps-route.mps
# Now do a test of reading tracks from a route-only file - should have an empty result
rm -f ${TMPDIR}/mps-route.mps
gpsbabel -t -i mapsource -f ${REFERENCE}/route/route.mps -o mapsource,mpsverout=3 \
-F ${TMPDIR}/mps-route.mps
-compare ${TMPDIR}/mps-route.mps ${REFERENCE}/mps-empty.mps
+compare ${REFERENCE}/mps-empty.mps ${TMPDIR}/mps-route.mps
#
# Geocaching Database is a binary Palm format that, like the GPX variants
rm -f ${TMPDIR}/magellan.rte
gpsbabel -r -i magellan -f ${REFERENCE}/route/magellan.rte -o magellan \
-F ${TMPDIR}/magellan.rte
-compare ${TMPDIR}/magellan.rte ${REFERENCE}/route/magellan.rte
+compare ${REFERENCE}/route/magellan.rte ${TMPDIR}/magellan.rte
#
-F ${TMPDIR}/gpxroute.gpx
gpsbabel -r -i gpx -f ${TMPDIR}/gpxroute.gpx -o magellan \
-F ${TMPDIR}/maggpx.rte
-compare ${TMPDIR}/maggpx.rte ${REFERENCE}/route/magellan.rte
+compare ${REFERENCE}/route/magellan.rte ${TMPDIR}/maggpx.rte
#
# GPX tracks -- since GPX contains a date stamp, tests will always
#
# Navicache.
gpsbabel -i navicache -f ${REFERENCE}/navicache.xml -o gpsutil -F ${TMPDIR}/navi.wpt
-compare ${TMPDIR}/navi.wpt ${REFERENCE}/navicache.ref
+compare ${REFERENCE}/navicache.ref ${TMPDIR}/navi.wpt
#
#
# CoastalExplorer..
gpsbabel -r -i coastexp -f ${REFERENCE}/coastexp.nob -o gpx -F ${TMPDIR}/coastexp.gpx
-compare ${TMPDIR}/coastexp.gpx ${REFERENCE}/coastexp.ref
+compare ${REFERENCE}/coastexp.ref ${TMPDIR}/coastexp.gpx
gpsbabel -r -i gpx -f ${TMPDIR}/coastexp.gpx -o coastexp -F ${TMPDIR}/coastexp.nob
-compare ${TMPDIR}/coastexp.nob ${REFERENCE}/coastexp.ref2
+compare ${REFERENCE}/coastexp.ref2 ${TMPDIR}/coastexp.nob
gpsbabel -w -i coastexp -f ${REFERENCE}/coastexp.nob -o gpx -F ${TMPDIR}/coastexp.gpx
-compare ${TMPDIR}/coastexp.gpx ${REFERENCE}/coastexp.ref3
+compare ${REFERENCE}/coastexp.ref3 ${TMPDIR}/coastexp.gpx
gpsbabel -w -i gpx -f ${TMPDIR}/coastexp.gpx -o coastexp -F ${TMPDIR}/coastexp.nob
-compare ${TMPDIR}/coastexp.nob ${REFERENCE}/coastexp.ref4
+compare ${REFERENCE}/coastexp.ref4 ${TMPDIR}/coastexp.nob
#
# PsiTrex. A text format that can't be handled by XCSV due to context of
gpsbabel -i xmap -f ${REFERENCE}/arcdist_input.txt \
-x arc,file=${REFERENCE}/arcdist_arc.txt,distance=1 \
-o xmap -F ${TMPDIR}/arcdist.txt
-compare ${TMPDIR}/arcdist.txt ${REFERENCE}/arcdist_output.txt
+compare ${REFERENCE}/arcdist_output.txt ${TMPDIR}/arcdist.txt
#
# Polygon filter
gpsbabel -i xmap -f ${REFERENCE}/arcdist_input.txt \
-x polygon,file=${REFERENCE}/polygon_allencty.txt \
-o xmap -F ${TMPDIR}/polygon.txt
-compare ${TMPDIR}/polygon.txt ${REFERENCE}/polygon_output.txt
+compare ${REFERENCE}/polygon_output.txt ${TMPDIR}/polygon.txt
#
# Simplify filter
gpsbabel -r -i gpx -f ${REFERENCE}/route/route.gpx \
-x simplify,count=10 \
-o arc -F ${TMPDIR}/simplify.txt
-compare ${TMPDIR}/simplify.txt ${REFERENCE}/simplify_output.txt
+compare ${REFERENCE}/simplify_output.txt ${TMPDIR}/simplify.txt
#
# Route reversal filter. Do it twice and be sure we get what we
compare ${TMPDIR}/1.gpx ${TMPDIR}/2.gpx
#
gpsbabel -i geoniche -f ${REFERENCE}/gn-targets.pdb -o gpx -F ${TMPDIR}/gn-targets.gpx
-compare ${TMPDIR}/gn-targets.gpx ${REFERENCE}/gn-targets.gpx
+compare ${REFERENCE}/gn-targets.gpx ${TMPDIR}/gn-targets.gpx
#
# saroute covers *.anr, *.rte, and *.rtd, but I only have an .anr for testing.
#
rm -f ${TMPDIR}/google.out
gpsbabel -i google -f ${REFERENCE}/google.xml -o csv -F ${TMPDIR}/google.out
-compare ${TMPDIR}/google.out ${REFERENCE}/google.csv
+compare ${REFERENCE}/google.csv ${TMPDIR}/google.out
rm -f ${TMPDIR}/google.out
gpsbabel -i google -f ${REFERENCE}/google.js -o csv -F ${TMPDIR}/google.out
-compare ${TMPDIR}/google.out ${REFERENCE}/google.csv
+compare ${REFERENCE}/google.csv ${TMPDIR}/google.out
rm -f ${TMPDIR}/google.out
gpsbabel -i google -f ${REFERENCE}/google_jan_06.html -o csv -F ${TMPDIR}/google.out
-compare ${TMPDIR}/google.out ${REFERENCE}/google_jan_06.csv
+compare ${REFERENCE}/google_jan_06.csv ${TMPDIR}/google.out
rm -f ${TMPDIR}/google.out
gpsbabel -i google -f ${REFERENCE}/google_multisegment.js -o gpx -F ${TMPDIR}/google.out
-compare ${TMPDIR}/google.out ${REFERENCE}/google_multisegment.gpx
+compare ${REFERENCE}/google_multisegment.gpx ${TMPDIR}/google.out
#
# DeLorme .an1 tests
#
rm -f ${TMPDIR}/an1.out
gpsbabel -i an1 -f ${REFERENCE}/foo.an1 -o csv -F ${TMPDIR}/an1.out
-compare ${TMPDIR}/an1.out ${REFERENCE}/an1-in.ref
+compare ${REFERENCE}/an1-in.ref ${TMPDIR}/an1.out
rm -f ${TMPDIR}/an1.out
gpsbabel -i an1 -f ${REFERENCE}/foo.an1 -o an1 -F ${TMPDIR}/an1.out
rm -f ${TMPDIR}/ov2.out
gpsbabel -i arc -f ${REFERENCE}/google.arc -o tomtom -F ${TMPDIR}/ov2.out
-compare ${TMPDIR}/ov2.out ${REFERENCE}/ov2-arc-out.ref
+compare ${REFERENCE}/ov2-arc-out.ref ${TMPDIR}/ov2.out
rm -f ${TMPDIR}/ov2.out
gpsbabel -i geo -f ${REFERENCE}/gl.loc -o tomtom -F ${TMPDIR}/ov2.out
-compare ${TMPDIR}/ov2.out ${REFERENCE}/ov2-geo-out.ref
+compare ${REFERENCE}/ov2-geo-out.ref ${TMPDIR}/ov2.out
rm -f ${TMPDIR}/ov2.out
gpsbabel -i tomtom -f ${REFERENCE}/ov2-geo-out.ref -o gpsutil -F ${TMPDIR}/ov2.out
-compare ${TMPDIR}/ov2.out ${REFERENCE}/ov2-in.ref
+compare ${REFERENCE}/ov2-in.ref ${TMPDIR}/ov2.out
#
# XCSV "human readable" tests
#
rm -f ${TMPDIR}/humanread.out
gpsbabel -i xcsv,style=${REFERENCE}/humanread.style -f ${REFERENCE}/human.in -o arc -F ${TMPDIR}/humanread.out
-compare ${TMPDIR}/humanread.out ${REFERENCE}/humanread.out
+compare ${REFERENCE}/humanread.out ${TMPDIR}/humanread.out
rm -f ${TMPDIR}/humanwrite.out
gpsbabel -i xcsv,style=${REFERENCE}/humanread.style -f ${REFERENCE}/human.in -o xcsv,style=${REFERENCE}/humanwrite.style -F ${TMPDIR}/humanwrite.out
-compare ${TMPDIR}/humanwrite.out ${REFERENCE}/humanwrite.out
+compare ${REFERENCE}/humanwrite.out ${TMPDIR}/humanwrite.out
#
# XCSV "path distance" test
#
rm -f ${TMPDIR}/pathdist.out
gpsbabel -i magellan -f ${REFERENCE}/dusky.trk -o xcsv,style=${REFERENCE}/gnuplot.style -F ${TMPDIR}/pathdist.out
-compare ${TMPDIR}/pathdist.out ${REFERENCE}/dusky.gnuplot
+compare ${REFERENCE}/dusky.gnuplot ${TMPDIR}/pathdist.out
# hsandv
rm -f ${TMPDIR}/hsandv.exp ${TMPDIR}/1.exp ${TMPDIR}/1.exp ${TMPDIR}/Glad_5.exp
rm -f ${TMPDIR}/pathaway*
gpsbabel -i geo -f ${REFERENCE}/../geocaching.loc -o pathaway,dbname="pathaway-geo" -F ${TMPDIR}/pathaway-geo.pdb
gpsbabel -i pathaway -f ${TMPDIR}/pathaway-geo.pdb -o geo -F ${TMPDIR}/pathaway-geo.loc
-compare ${TMPDIR}/pathaway-geo.loc ${REFERENCE}/pathaway-geo.loc
+compare ${REFERENCE}/pathaway-geo.loc ${TMPDIR}/pathaway-geo.loc
rm -f ${TMPDIR}/pathaway*
gpsbabel -t -i pathaway -f ${REFERENCE}/track/pathaway.pdb -o gpx -F ${TMPDIR}/pathaway.gpx
-compare ${TMPDIR}/pathaway.gpx ${REFERENCE}/track/pathaway.gpx
+compare ${REFERENCE}/track/pathaway.gpx ${TMPDIR}/pathaway.gpx
#
# Garmin GPS Database .gdb tests
#
rm -f ${TMPDIR}/vitosmt*
gpsbabel -i vitosmt -f ${REFERENCE}/vitosmt.smt -o gpx -F ${TMPDIR}/vitosmt.gpx
-compare ${TMPDIR}/vitosmt.gpx ${REFERENCE}/vitosmt.gpx
+compare ${REFERENCE}/vitosmt.gpx ${TMPDIR}/vitosmt.gpx
gpsbabel -t -i vitosmt -f ${REFERENCE}/vitosmt.smt -o gpx -F ${TMPDIR}/vitosmt_t.gpx
-compare ${TMPDIR}/vitosmt_t.gpx ${REFERENCE}/track/vitosmt_t.gpx
+compare ${REFERENCE}/track/vitosmt_t.gpx ${TMPDIR}/vitosmt_t.gpx
#
# Map&Guide Motorrad Routenplaner .bcr files test
#
rm -f ${TMPDIR}/cet-sample*
gpsbabel -w -i gdb -f ${REFERENCE}/cet/cet-sample.gdb -o gpx -F ${TMPDIR}/cet-sample.gpx
-compare ${TMPDIR}/cet-sample.gpx ${REFERENCE}/cet/cet-sample.gpx
+compare ${REFERENCE}/cet/cet-sample.gpx ${TMPDIR}/cet-sample.gpx
gpsbabel -w -i gpx -f ${TMPDIR}/cet-sample.gpx -o tmpro -c Latin1 -F ${TMPDIR}/cet-sample.latin1.txt
-compare ${TMPDIR}/cet-sample.latin1.txt ${REFERENCE}/cet/cet-sample.latin1.txt
+compare ${REFERENCE}/cet/cet-sample.latin1.txt ${TMPDIR}/cet-sample.latin1.txt
gpsbabel -w -i gdb -f ${REFERENCE}/cet/cet-sample.gdb -o tmpro -c Latin2 -F ${TMPDIR}/cet-sample.latin2.txt
-compare ${TMPDIR}/cet-sample.latin2.txt ${REFERENCE}/cet/cet-sample.latin2.txt
+compare ${REFERENCE}/cet/cet-sample.latin2.txt ${TMPDIR}/cet-sample.latin2.txt
gpsbabel -w -i gdb -f ${REFERENCE}/cet/cet-sample.gdb -o tmpro -c cp1250 -F ${TMPDIR}/cet-sample.cp1250.txt
-compare ${TMPDIR}/cet-sample.cp1250.txt ${REFERENCE}/cet/cet-sample.cp1250.txt
+compare ${REFERENCE}/cet/cet-sample.cp1250.txt ${TMPDIR}/cet-sample.cp1250.txt
gpsbabel -w -i gdb -f ${REFERENCE}/cet/cet-sample.gdb -o tmpro -c macroman -F ${TMPDIR}/cet-sample.macroman.txt
-compare ${TMPDIR}/cet-sample.macroman.txt ${REFERENCE}/cet/cet-sample.macroman.txt
+compare ${REFERENCE}/cet/cet-sample.macroman.txt ${TMPDIR}/cet-sample.macroman.txt
#
# Garmin logbook. This format has an extra section (lap data with things
#
gpsbabel -i ignrando -f ${REFERENCE}/track/ignrando-sample.rdn -o ignrando -F ${TMPDIR}/ignrando-sample.rdn
gpsbabel -i ignrando -f ${TMPDIR}/ignrando-sample.rdn -o gpx -F ${TMPDIR}/ignrando-sample.gpx
-compare ${TMPDIR}/ignrando-sample.gpx ${REFERENCE}/track/ignrando-sample.gpx
+compare ${REFERENCE}/track/ignrando-sample.gpx ${TMPDIR}/ignrando-sample.gpx
#
gpsbabel -i ignrando -f ${REFERENCE}/track/ignrando-sample.rdn -o ignrando -F ${TMPDIR}/ignrando-sample.rdn
gpsbabel -i ignrando -f ${TMPDIR}/ignrando-sample.rdn -o gpx -F ${TMPDIR}/ignrando-sample.gpx
-compare ${TMPDIR}/ignrando-sample.gpx ${REFERENCE}/track/ignrando-sample.gpx
+compare ${REFERENCE}/track/ignrando-sample.gpx ${TMPDIR}/ignrando-sample.gpx
#
# STMwpp "Suunto Trek Manager" WaypointPlus format tests
#
rm -f ${TMPDIR}/stmwpp-*
gpsbabel -i stmwpp -f ${REFERENCE}/track/stmwpp-track.txt -o gpx -F ${TMPDIR}/stmwpp-track.gpx
-compare ${TMPDIR}/stmwpp-track.gpx ${REFERENCE}/track/stmwpp-track.gpx
+compare ${REFERENCE}/track/stmwpp-track.gpx ${TMPDIR}/stmwpp-track.gpx
gpsbabel -i stmwpp -f ${REFERENCE}/route/stmwpp-route.txt -o gpx -F ${TMPDIR}/stmwpp-route.gpx
-compare ${TMPDIR}/stmwpp-route.gpx ${REFERENCE}/route/stmwpp-route.gpx
+compare ${REFERENCE}/route/stmwpp-route.gpx ${TMPDIR}/stmwpp-route.gpx
gpsbabel -i stmwpp -f ${REFERENCE}/route/stmwpp-route.txt -o stmwpp -F ${TMPDIR}/stmwpp-route.txt
-compare ${TMPDIR}/stmwpp-route.txt ${REFERENCE}/route/stmwpp-route.txt
+compare ${REFERENCE}/route/stmwpp-route.txt ${TMPDIR}/stmwpp-route.txt
#
# Microsoft AutoRoute 2002 test (read-only)
#
gpsbabel -i msroute -f ${REFERENCE}/route/msroute-sample.axe -o gpx -F ${TMPDIR}/msroute-sample.gpx
-compare ${TMPDIR}/msroute-sample.gpx ${REFERENCE}/route/msroute-sample.gpx
+compare ${REFERENCE}/route/msroute-sample.gpx ${TMPDIR}/msroute-sample.gpx
#
# CarteSurTable read test
#
rm -f ${TMPDIR}/cst-*
gpsbabel -i cst -f ${REFERENCE}/route/cst-sample.cst -o gpx -F ${TMPDIR}/cst-sample.gpx
-compare ${TMPDIR}/cst-sample.gpx ${REFERENCE}/route/cst-sample.gpx
+compare ${REFERENCE}/route/cst-sample.gpx ${TMPDIR}/cst-sample.gpx
#
# Navigon Mobile Navigator .rte tests
# Wfff.
#
gpsbabel -i wfff -f ${REFERENCE}/wfff.xml -o gpsutil -F ${TMPDIR}/wfff.gpu
-compare ${TMPDIR}/wfff.gpu ${REFERENCE}/wfff.gpu
+compare ${REFERENCE}/wfff.gpu ${TMPDIR}/wfff.gpu
#
#
rm -f ${TMPDIR}/hiketech*
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o hiketech -F ${TMPDIR}/hiketech.out
-compare ${TMPDIR}/hiketech.out ${REFERENCE}/hiketech.ref
+compare ${REFERENCE}/hiketech.ref ${TMPDIR}/hiketech.out
gpsbabel -i hiketech -f ${REFERENCE}/hiketech.ref -o gpx -F ${TMPDIR}/hiketech.gpx
-compare ${TMPDIR}/hiketech.gpx ${REFERENCE}/hiketech.gpx
+compare ${REFERENCE}/hiketech.gpx ${TMPDIR}/hiketech.gpx
#
# Kartex waypoints and tracks
gpsbabel -i wbt-bin -f ${REFERENCE}/wbt-200.bin -o gpx -F ${TMPDIR}/wbt-200.gpx
# Remove the timestamp
grep -v time <${TMPDIR}/wbt-200.gpx >${TMPDIR}/wbt-200.gpx2
-compare ${TMPDIR}/wbt-200.gpx2 ${REFERENCE}/wbt-200.gpx
+compare ${REFERENCE}/wbt-200.gpx ${TMPDIR}/wbt-200.gpx2
#
# WBT-201 tests
gpsbabel -t -w -i wbt-bin -f ${REFERENCE}/wbt-201.tk1 -o gpx -F ${TMPDIR}/wbt-201.gpx
# Remove the timestamp
grep -v time <${TMPDIR}/wbt-201.gpx >${TMPDIR}/wbt-201.gpx2
-compare ${TMPDIR}/wbt-201.gpx2 ${REFERENCE}/wbt-201.gpx
+compare ${REFERENCE}/wbt-201.gpx ${TMPDIR}/wbt-201.gpx2
#
# Sportsim style-sheet
#
rm -f ${TMPDIR}/sportsim*
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -x nuketypes,waypoints,routes -o sportsim -F ${TMPDIR}/sportsim.txt
-compare ${TMPDIR}/sportsim.txt ${REFERENCE}/track/sportsim-sample.txt
+compare ${REFERENCE}/track/sportsim-sample.txt ${TMPDIR}/sportsim.txt
#
# Suunto SDF
#
rm -f ${TMPDIR}/stmsdf*
gpsbabel -i garmin_txt -f ${REFERENCE}/garmin_txt.txt -t -o stmsdf -F ${TMPDIR}/stmsdf-track.sdf -r -o stmsdf,index=2 -F ${TMPDIR}/stmsdf-route.sdf
-compare ${TMPDIR}/stmsdf-track.sdf ${REFERENCE}/track/stmsdf-track.sdf
-compare ${TMPDIR}/stmsdf-route.sdf ${REFERENCE}/route/stmsdf-route.sdf
+compare ${REFERENCE}/track/stmsdf-track.sdf ${TMPDIR}/stmsdf-track.sdf
+compare ${REFERENCE}/route/stmsdf-route.sdf ${TMPDIR}/stmsdf-route.sdf
gpsbabel -i stmsdf -f ${TMPDIR}/stmsdf-track.sdf -f ${TMPDIR}/stmsdf-route.sdf -o garmin_txt,prec=2 -F ${TMPDIR}/stmsdf.txt
-compare ${TMPDIR}/stmsdf.txt ${REFERENCE}/stmsdf.txt
+compare ${REFERENCE}/stmsdf.txt ${TMPDIR}/stmsdf.txt
#
# Digital Mapping Tracklogs
rm -f ${TMPDIR}/dmtlog*
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o dmtlog -F ${TMPDIR}/dmtlog-sample.trl
gpsbabel -i dmtlog -f ${TMPDIR}/dmtlog-sample.trl -o gpx -F ${TMPDIR}/dmtlog-sample.gpx
-compare ${TMPDIR}/dmtlog-sample.gpx ${REFERENCE}/track/dmtlog-sample.gpx
+compare ${REFERENCE}/track/dmtlog-sample.gpx ${TMPDIR}/dmtlog-sample.gpx
#
# gzipped file i/o
gpsbabel -i compegps -f ${REFERENCE}/compegps.wpt.gz -o gpx -F ${TMPDIR}/compegps-wpt.gpx
compare ${REFERENCE}/compegps-wpt.gpx ${TMPDIR}/compegps-wpt.gpx
gpsbabel -i cst -f ${REFERENCE}/route/cst-sample.cst.gz -o gpx -F ${TMPDIR}/cst-sample.gpx
-compare ${TMPDIR}/cst-sample.gpx ${REFERENCE}/route/cst-sample.gpx
+compare ${REFERENCE}/route/cst-sample.gpx ${TMPDIR}/cst-sample.gpx
#
# GPX version detection
#
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -x nuketypes,routes,tracks -x transform,rte=wpt,del=y -o gpx -F ${TMPDIR}/transform-ver.gpx
-compare ${TMPDIR}/transform-ver.gpx ${REFERENCE}/transform-rte.gpx
+compare ${REFERENCE}/transform-rte.gpx ${TMPDIR}/transform-ver.gpx
#
# "Raymarine Waypoint File" tests
#
gpsbabel -i raymarine -f ${REFERENCE}/raymarine-sample.rwf -o gpx -F ${TMPDIR}/raymarine-sample.gpx
-compare ${TMPDIR}/raymarine-sample.gpx ${REFERENCE}/raymarine-sample.gpx
+compare ${REFERENCE}/raymarine-sample.gpx ${TMPDIR}/raymarine-sample.gpx
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o raymarine -F ${TMPDIR}/expertgps.rwf
-compare ${TMPDIR}/expertgps.rwf ${REFERENCE}/expertgps.rwf
+compare ${REFERENCE}/expertgps.rwf ${TMPDIR}/expertgps.rwf
#
# VITO SmartMap .vtt track file 'vitovtt' test
# NaviLink waypoints
#
gpsbabel -i navilink -f ${REFERENCE}/navilink_waypoints.wpt -o gpx -F ${TMPDIR}/navilink_waypoints.gpx
-compare ${TMPDIR}/navilink_waypoints.gpx ${REFERENCE}/navilink_waypoints.gpx
+compare ${REFERENCE}/navilink_waypoints.gpx ${TMPDIR}/navilink_waypoints.gpx
gpsbabel -i gpx -f ${TMPDIR}/navilink_waypoints.gpx -o navilink -F ${TMPDIR}/navilink_waypoints_gpx.wpt
#compare ${TMPDIR}/navilink_waypoints_gpx.wpt ${REFERENCE}/navilink_waypoints_gpx.wpt
# NaviLink tracks
#
gpsbabel -t -i navilink -f ${REFERENCE}/navilink_tracks.trk -o gpx -F ${TMPDIR}/navilink_tracks.gpx
-compare ${TMPDIR}/navilink_tracks.gpx ${REFERENCE}/navilink_tracks.gpx
+compare ${REFERENCE}/navilink_tracks.gpx ${TMPDIR}/navilink_tracks.gpx
gpsbabel -t -i gpx -f ${TMPDIR}/navilink_tracks.gpx -o navilink -F ${TMPDIR}/navilink_tracks_gpx.trk
#compare ${TMPDIR}/navilink_tracks_gpx.trk ${REFERENCE}/navilink_tracks_gpx.trk
# SBP tracks (Locosys NaviGPS)
#
gpsbabel -t -i sbp -f ${REFERENCE}/track/datalog.sbp -o gpx -F ${TMPDIR}/datalog.gpx
-compare ${TMPDIR}/datalog.gpx ${REFERENCE}/track/datalog.gpx
+compare ${REFERENCE}/track/datalog.gpx ${TMPDIR}/datalog.gpx
#
# MTK logger tests
#
rm -f ${TMPDIR}/mtk_logger.*
gpsbabel -t -w -i mtk-bin,csv=${TMPDIR}/mtk_logger.csv -f ${REFERENCE}/track/mtk_logger.bin -o gpx -F ${TMPDIR}/mtk_logger.gpx
-compare ${TMPDIR}/mtk_logger.gpx ${REFERENCE}/track/mtk_logger.gpx
+compare ${REFERENCE}/track/mtk_logger.gpx ${TMPDIR}/mtk_logger.gpx
## CSV compare needs to be done with '-w' - ignore whitespace.
-compare ${TMPDIR}/mtk_logger.csv ${REFERENCE}/track/mtk_logger.csv
+compare ${REFERENCE}/track/mtk_logger.csv ${TMPDIR}/mtk_logger.csv
#
# MTK logger tests (Holux M-241)
#
rm -f ${TMPDIR}/mtk_logger_m241.*
gpsbabel -t -w -i m241-bin,csv=${TMPDIR}/mtk_logger_m241.csv -f ${REFERENCE}/track/mtk_logger_m241.bin -o gpx -F ${TMPDIR}/mtk_logger_m241.gpx
-compare ${TMPDIR}/mtk_logger_m241.gpx ${REFERENCE}/track/mtk_logger_m241.gpx
+compare ${REFERENCE}/track/mtk_logger_m241.gpx ${TMPDIR}/mtk_logger_m241.gpx
## CSV compare needs to be done with '-w' - ignore whitespace.
-compare ${TMPDIR}/mtk_logger_m241.csv ${REFERENCE}/track/mtk_logger_m241.csv
+compare ${REFERENCE}/track/mtk_logger_m241.csv ${TMPDIR}/mtk_logger_m241.csv
#
# MTK logger tests (Holux GPsport-245 - using m241 module)
#
rm -f ${TMPDIR}/mtk_logger_gp245.*
gpsbabel -t -w -i m241-bin -f ${REFERENCE}/track/mtk_logger_gp245.bin -o gpx -F ${TMPDIR}/mtk_logger_gp245.gpx
-compare ${TMPDIR}/mtk_logger_gp245.gpx ${REFERENCE}/track/mtk_logger_gp245.gpx
+compare ${REFERENCE}/track/mtk_logger_gp245.gpx ${TMPDIR}/mtk_logger_gp245.gpx
#
# MagicMaps IK3D Project File .ikt test
# Exif format test (read only)
gpsbabel -i exif -f ${REFERENCE}/IMG_2065.JPG -o unicsv,utc=0 -F ${TMPDIR}/exif-dat.csv
-compare ${TMPDIR}/exif-dat.csv ${REFERENCE}/exif-dat.csv
+compare ${REFERENCE}/exif-dat.csv ${TMPDIR}/exif-dat.csv
# VidaOne track logs
gpsbabel -i vidaone -f ${REFERENCE}/track/vidaone.gpb -t -o unicsv -F ${TMPDIR}/vidaone.csv
-compare ${TMPDIR}/vidaone.csv ${REFERENCE}/track/vidaone.csv
+compare ${REFERENCE}/track/vidaone.csv ${TMPDIR}/vidaone.csv
# GoPal
# GoPal is a bit tricky, because it's a lossy format regarding the first field (timetick).
# Gopal with 11 fields is slightly more sane.
gpsbabel -i gopal -f ${REFERENCE}/gopal-11.trk -o gpx -F ${TMPDIR}/gopal-11-gpx.gpx
-compare ${TMPDIR}/gopal-11-gpx.gpx ${REFERENCE}/gopal-11-gpx.gpx
+compare ${REFERENCE}/gopal-11-gpx.gpx ${TMPDIR}/gopal-11-gpx.gpx
#
# iBlue747 (style) track files
# Destinator POI
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o destinator_poi -F ${TMPDIR}/destinator_poi.dat
gpsbabel -i destinator_poi -f ${TMPDIR}/destinator_poi.dat -w -o unicsv,utc=0 -F ${TMPDIR}/destinator_poi.txt
-compare ${TMPDIR}/destinator_poi.txt ${REFERENCE}/destinator_poi.txt
+compare ${REFERENCE}/destinator_poi.txt ${TMPDIR}/destinator_poi.txt
# Destinator Itinerary
gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o destinator_itn -F ${TMPDIR}/destinator_itn.dat
gpsbabel -i destinator_itn -f ${TMPDIR}/destinator_itn.dat -r -o unicsv,utc=0 -F ${TMPDIR}/destinator_itn.txt
-compare ${TMPDIR}/destinator_itn.txt ${REFERENCE}/route/destinator_itn.txt
+compare ${REFERENCE}/route/destinator_itn.txt ${TMPDIR}/destinator_itn.txt
# Destinator TrackLog
gpsbabel -i nmea -f ${REFERENCE}/track/nmea+ms.txt -o destinator_trl -F ${TMPDIR}/destinator_trl.dat
gpsbabel -i destinator_trl -f ${TMPDIR}/destinator_trl.dat -t -o unicsv,utc=0 -F ${TMPDIR}/destinator_trl.txt
-compare ${TMPDIR}/destinator_trl.txt ${REFERENCE}/track/destinator_trl.txt
+compare ${REFERENCE}/track/destinator_trl.txt ${TMPDIR}/destinator_trl.txt
#
rm -f ${TMPDIR}/fit-*
gpsbabel -i garmin_fit -f ${REFERENCE}/track/fit-sample.fit -o gpx -F ${TMPDIR}/fit-sameple.gpx
-compare ${TMPDIR}/fit-sameple.gpx ${REFERENCE}/track/fit-sample.gpx
+compare ${REFERENCE}/track/fit-sample.gpx ${TMPDIR}/fit-sameple.gpx
gpsbabel -i garmin_fit -f ${REFERENCE}/track/garmin-edge-200-output.fit -o gpx -F ${TMPDIR}/fit-sample.gpx
-compare ${TMPDIR}/fit-sample.gpx ${REFERENCE}/track/garmin-edge-200-output.gpx
+compare ${REFERENCE}/track/garmin-edge-200-output.gpx ${TMPDIR}/fit-sample.gpx
gpsbabel -i garmin_fit -f ${REFERENCE}/track/garmin-edge-800.fit -o gpx -F ${TMPDIR}/fit-sample-800.gpx
-compare ${TMPDIR}/fit-sample-800.gpx ${REFERENCE}/track/garmin-edge-800-output.gpx
+compare ${REFERENCE}/track/garmin-edge-800-output.gpx ${TMPDIR}/fit-sample-800.gpx
#
gpsbabel -i garmin_xt,ftype=ATRK -f ${REFERENCE}/track/GARMIN_ATRK.NVM -o gpx -F ${TMPDIR}/garmin_xt_atrk.gpx
-compare ${TMPDIR}/garmin_xt_atrk.gpx ${REFERENCE}/track/garmin_xt_atrk.gpx
+compare ${REFERENCE}/track/garmin_xt_atrk.gpx ${TMPDIR}/garmin_xt_atrk.gpx
gpsbabel -i garmin_xt,ftype=STRK -f ${REFERENCE}/track/GARMIN_STRK.NVM -o gpx -F ${TMPDIR}/garmin_xt_strk.gpx
-compare ${TMPDIR}/garmin_xt_strk.gpx ${REFERENCE}/track/garmin_xt_strk.gpx
+compare ${REFERENCE}/track/garmin_xt_strk.gpx ${TMPDIR}/garmin_xt_strk.gpx
rm -f ${TMPDIR}/igc*out
gpsbabel -i gpx -f ${REFERENCE}/igc1.gpx -o igc -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed.out
-compare ${TMPDIR}/igc_sed.out ${REFERENCE}/igc1_igc.out
+compare ${REFERENCE}/igc1_igc.out ${TMPDIR}/igc_sed.out
gpsbabel -i igc -f ${TMPDIR}/igc.out -o gpx -F ${TMPDIR}/igc.gpx
-compare ${TMPDIR}/igc.gpx ${REFERENCE}/igc1_gpx.out
+compare ${REFERENCE}/igc1_gpx.out ${TMPDIR}/igc.gpx
gpsbabel -i gpx -f ${TMPDIR}/igc.gpx -o igc -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed.out
-compare ${TMPDIR}/igc_sed.out ${REFERENCE}/igc1_igc.out
+compare ${REFERENCE}/igc1_igc.out ${TMPDIR}/igc_sed.out
gpsbabel -i gpx -f ${REFERENCE}/igc1_baro.gpx -i igc -f ${REFERENCE}/igc1_igc.out -o igc,timeadj=auto -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed.out
-compare ${TMPDIR}/igc_sed.out ${REFERENCE}/igc1_3d.out
+compare ${REFERENCE}/igc1_3d.out ${TMPDIR}/igc_sed.out
gpsbabel -i igc -f ${REFERENCE}/igc2.igc -o gpx -F ${TMPDIR}/igc.gpx
-compare ${TMPDIR}/igc.gpx ${REFERENCE}/igc2_gpx.out
+compare ${REFERENCE}/igc2_gpx.out ${TMPDIR}/igc.gpx
gpsbabel -i gpx -f ${TMPDIR}/igc.gpx -o igc -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed.out
-compare ${TMPDIR}/igc_sed.out ${REFERENCE}/igc2_igc.out
+compare ${REFERENCE}/igc2_igc.out ${TMPDIR}/igc_sed.out
gpsbabel -i igc -f ${TMPDIR}/igc.out -o gpx -F ${TMPDIR}/igc.gpx
-compare ${TMPDIR}/igc.gpx ${REFERENCE}/igc2_gpx.out
+compare ${REFERENCE}/igc2_gpx.out ${TMPDIR}/igc.gpx
# Magellanx routes, however, have an extra 'name' field in them.
gpsbabel -r -i magellanx -f ${REFERENCE}/route/magexplorist.rte -o magellanx -F ${TMPDIR}/magxfile.rte
gpsbabel -r -i magellanx -f ${TMPDIR}/magxfile.rte -o magellanx -F ${TMPDIR}/magxfile2.rte
-compare ${TMPDIR}/magxfile2.rte ${REFERENCE}/route/magexplorist.rte
+compare ${REFERENCE}/route/magexplorist.rte ${TMPDIR}/magxfile2.rte
# Basic NMEA tests
#
gpsbabel -i nmea -f ${REFERENCE}/track/nmea -o gpx -F ${TMPDIR}/nmea.gpx
-compare ${TMPDIR}/nmea.gpx ${REFERENCE}/track/nmea.gpx
+compare ${REFERENCE}/track/nmea.gpx ${TMPDIR}/nmea.gpx
gpsbabel -i nmea -f ${REFERENCE}/track/nmea+ms.txt -o gpx -F ${TMPDIR}/nmea+ms.gpx
-compare ${TMPDIR}/nmea+ms.gpx ${REFERENCE}/track/nmea+ms.gpx
+compare ${REFERENCE}/track/nmea+ms.gpx ${TMPDIR}/nmea+ms.gpx
#
# Read an NMEA file with AMOD 3808 waypoints. Be sure we read the points.
# Also write as a "normal" NMEA to be sure AMOD extensions don't leak.
#
gpsbabel -i nmea -f ${REFERENCE}/track/amod-nmea -o gpx -F ${TMPDIR}/amod-out.gpx -o nmea -F ${TMPDIR}/amod-pure
-compare ${TMPDIR}/amod-out.gpx ${REFERENCE}/track/amod.gpx
+compare ${REFERENCE}/track/amod.gpx ${TMPDIR}/amod-out.gpx
compare ${TMPDIR}/amod-pure ${REFERENCE}/track/amod-cleansed
# SBN tracks (Locosys NaviGPS)
#
gpsbabel -t -i sbn -f ${REFERENCE}/track/sbn.SBN -o gpx -F ${TMPDIR}/sbn.gpx
-compare ${TMPDIR}/sbn.gpx ${REFERENCE}/track/sbn.gpx
+compare ${REFERENCE}/track/sbn.gpx ${TMPDIR}/sbn.gpx
# V1.3 of the firmware added two bytes in the packet
gpsbabel -t -i sbn -f ${REFERENCE}/track/sbn-v13.sbn -o gpx -F ${TMPDIR}/sbn-v13.gpx
-compare ${TMPDIR}/sbn-v13.gpx ${REFERENCE}/track/sbn-v13.gpx
+compare ${REFERENCE}/track/sbn-v13.gpx ${TMPDIR}/sbn-v13.gpx
#
rm -f ${TMPDIR}/skytraq.*
gpsbabel -t -w -i skytraq-bin -f ${REFERENCE}/skytraq.bin -o gpx -F ${TMPDIR}/skytraq.gpx
-compare ${TMPDIR}/skytraq.gpx ${REFERENCE}/skytraq.gpx
+compare ${REFERENCE}/skytraq.gpx ${TMPDIR}/skytraq.gpx
#
# The original was recorded in Germany, thus all coordinates are positive.
# This one is in North America and triggered a sign extension bug on 64-bit
# systems prior to revision 4176.
gpsbabel -t -w -i skytraq-bin -f ${REFERENCE}/skytraq-2.bin -o gpx -F ${TMPDIR}/skytraq-2.gpx
-compare ${TMPDIR}/skytraq-2.gpx ${REFERENCE}/skytraq-2.gpx
+compare ${REFERENCE}/skytraq-2.gpx ${TMPDIR}/skytraq-2.gpx
gpsbabel -t -w -i skytraq-bin -f ${REFERENCE}/skytraq-realdata.bin -o gpx -F ${TMPDIR}/skytraq-realdata.gpx
-compare ${TMPDIR}/skytraq-realdata.gpx ${REFERENCE}/skytraq-realdata.gpx
+compare ${REFERENCE}/skytraq-realdata.gpx ${TMPDIR}/skytraq-realdata.gpx
gpsbabel -t -w -i skytraq-bin -f ${REFERENCE}/skytraq-artificial.bin -o gpx -F ${TMPDIR}/skytraq-artificial.gpx
-compare ${TMPDIR}/skytraq-artificial.gpx ${REFERENCE}/skytraq-artificial.gpx
+compare ${REFERENCE}/skytraq-artificial.gpx ${TMPDIR}/skytraq-artificial.gpx
rm -f ${TMPDIR}/trackfilter*
gpsbabel -t -i gpx -f ${REFERENCE}/track/trackfilter.gpx -x track,pack,split,title="LOG-%Y%m%d" -o gpx -F ${TMPDIR}/trackfilter.gpx
-compare ${TMPDIR}/trackfilter.gpx ${REFERENCE}/track/trackfilter.gpx
+compare ${REFERENCE}/track/trackfilter.gpx ${TMPDIR}/trackfilter.gpx
gpsbabel -t -i gpx -f ${REFERENCE}/track/trackfilter.gpx -x track,pack,split,sdistance=0.1k -o gpx -F ${TMPDIR}/trackfilter2.gpx
-compare ${TMPDIR}/trackfilter2.gpx ${REFERENCE}/track/trackfilter-sdistance.gpx
+compare ${REFERENCE}/track/trackfilter-sdistance.gpx ${TMPDIR}/trackfilter2.gpx
gpsbabel -t -i gpx -f ${REFERENCE}/track/trackfilter.gpx -x track,pack,sdistance=0.1k,split=5m,title=%Y%m%d -o gpx -F ${TMPDIR}/trackfilter-sdistance2.gpx
-compare ${TMPDIR}/trackfilter-sdistance2.gpx ${REFERENCE}/track/trackfilter-sdistance2.gpx
+compare ${REFERENCE}/track/trackfilter-sdistance2.gpx ${TMPDIR}/trackfilter-sdistance2.gpx
# Exercise the 'faketime' filter. The middle of the three points has
# time so we can exercise the 'forced' option, too.